package com.gitee.wsl.common.ui.draw.api

import com.gitee.wsl.common.ui.draw.node.Node

/**
 * Common interface of a parent node.
 * The parent node can add different type of children nodes:
 * Line, Circle, Rect, Text, Path, Image and Group.
 *
 * Viz, Group and Layer are parent nodes.
 */
 interface HasChildren {

    /**
     * Add a child node
     */
     fun add(node: Node)

    /**
     * Remove a child node
     */
     fun remove(node: Node)

    /**
     * Remove all children
     * TODO rename?
     */
     fun clear()
}